#include<bits/stdc++.h>
using namespace std;
int n,a[100005],sum;
int main(){
    freopen("duel.in","r",stdin);
    freopen("duel.out","w",stdout);
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    cin>>n;
    for(int i=1;i<=n;i++)cin>>a[i];
    sort(a+1,a+1+n);
    int j=1;
    for(int i=1;i<=n;i++){
        while (a[i]<=a[j]&&i<n)i++;
        if(a[i]>a[j]){
            sum++;
            j++;
        }
    }
    cout<<n-sum;
    return 0;
}
